package cn.highedu.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import javax.management.MXBean;
import java.util.*;

@Configuration
@ComponentScan("cn.highedu.spring")
public class ContextPro {
    @Bean // Spring容器中有一个对象 标识(id)是roles
    public List<String> roles() {
        List<String> roles = Arrays.asList("上单", "打野", "辅助");
        return roles;
    }

    // Spring容器中有一个对象 标识(id)是skills
    @Bean
    public Map<String, String> skills() {
        Map<String, String> skills = new HashMap<>();
        skills.put("1技能", "灵魂之锁");
        skills.put("2技能", "神圣之盾");
        skills.put("3技能", "圣剑裁决");
        skills.put("被动技能", "亚瑟王的叹息");
        return skills;
    }
}
